﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    class Role
    {
        private string name;
        private string strmora;
        public string Name { get; set; }
        public string StrMora
        {
            get { return this.strmora; }
            set { this.strmora = value; }
        }

        public Role(string name)
        {
            this.Name = name;
        }
        public void Test(string strmora)
        {
            Random random = new Random();

            if (random.Next(1, 4) == 1)
            {
                strmora = "石头";
            }
            else if (random.Next(1, 4) == 2)
            {
                strmora = "布";
            }
            else if (random.Next(1, 4) == 3)
            {
                strmora = "剪刀";
            }
            this.StrMora = strmora;
        }
        public void Write()
        {
            Test(strmora);
            StrMora = strmora;
            Console.WriteLine("{0}: 出手 ：{1}", Name, StrMora);
        }

    }
}
